<?php
class province_state_prefecture extends Model{
	public static function getTableName(){
		return 'province_state_prefecture';
	}

	/**
	 * get province name
	 *
	 * @param int $province_id : province_state_prefecture id
	 *
	 * @used by : action/address
	 * @used by : action/biography
	 */
	public static function getProvinceName($province_id)
	{
		$province_id = is_null($province_id) ? '' : $province_id;
        $sql=   "SELECT * FROM ".self::getTableName()." where id='".$province_id."'";
        $ret=   Model::$dbo['r']->findBySql(__class__, $sql);
        return isset($ret[0]) ? $ret[0]->system_label : '';
	}
}
?>
